package com.ymtms.arrivalofgoods.bo;

import java.util.List;

/**
 * 返回前端数据的封装类，符合layui表格的格式
 */
public class GridResult<T> {
    // 当前页
//    Integer page;
    // 表格查询得到的数据集合
    List<T> data;
    // 查询得到的结果数量
    long count;
    // code
    Integer code;
    // 消息
    String msg;


    public GridResult() {
    }

    public GridResult(List<T> data, long count, Integer code, String msg) {
        this.data = data;
        this.count = count;
        this.code = code;
        this.msg = msg;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "GridResult{" +
                "data=" + data +
                ", count=" + count +
                ", code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
